//
// Created by LiuYou on 2021/5/6.
//

#ifndef HIGHPERFORMANCELINUXSERVERPROGRAMMING_LINUX_CLIENTDATA_HPP
#define HIGHPERFORMANCELINUXSERVERPROGRAMMING_LINUX_CLIENTDATA_HPP


#include <netinet/in.h>


namespace Client {
    inline constexpr int getBufferSize() {
        return 64;
    }

    class ClientData {
    public:
        sockaddr_in sockAddrIn;
        char* writeBuffer;
        char buffer[getBufferSize()];
    };

    int setNonBlocking(int fd);

}

#endif //HIGHPERFORMANCELINUXSERVERPROGRAMMING_LINUX_CLIENTDATA_HPP
